# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-dep-logic
pkgver=0.4.9
pkgrel=0
pkgdesc="Python dependency specifications supporting logical operations"
url="https://github.com/pdm-project/dep-logic"
arch="noarch"
license="Apache-2.0"
depends="py3-packaging"
makedepends="py3-gpep517 py3-pdm-backend py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/pdm-project/dep-logic/archive/$pkgver/py3-dep-logic-$pkgver.tar.gz
	support-more-architectures.patch
	"
builddir="$srcdir/dep-logic-$pkgver"

build() {
	export PDM_BUILD_SCM_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
336f0d0bab5865bb00e7bfd7210ff0a38fe9ad4f75e4541c258f624e197fa487d064c80435106a3e0ea94fb5629c17578c8cf7ac3d22ba1f2799537724bd970c  py3-dep-logic-0.4.9.tar.gz
4eb5f7cdfef27ed7c550059ff66eba420c4a0f4aaa58c74a2972b10a7da0315c576040eaa6b9df973e242055f0d2a9d409b7f2089ca023fd1c9937dab61cdc9a  support-more-architectures.patch
"
